<nz-layout class="overspread">
  <div class="reset-password">
    <nz-header class="password-header">重置密码</nz-header>
    <nz-content class="password-form">
      <form nz-form [formGroup]="passwordForm" role="form">
        <nz-form-item>
          <nz-form-control>
            <input type="password" nz-input nzSize="large" formControlName="password" autocomplete="off"
              placeholder="输入密码">
            <nz-form-explain *ngIf="!(passwordForm.get('password').valid || passwordForm.get('password').untouched)">
              <span class="text-danger" translate="form.explain.email"
                *ngIf="passwordForm.get('password').hasError('required')">此处为必填项！</span>
            </nz-form-explain>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-control>
            <input nz-input nzSize="large" type="password" formControlName="passwordConfirm" placeholder="确认密码">
            <nz-form-explain
              *ngIf="!(passwordForm.get('passwordConfirm').valid || passwordForm.get('passwordConfirm').untouched)">
              <span class="text-danger" translate="form.explain.pwd"
                *ngIf="passwordForm.get('passwordConfirm').hasError('required')">此处为必填项！
              </span>
              <span class="text-danger" translate="form.explain.pwd"
                *ngIf="passwordForm.get('passwordConfirm').value !== passwordForm.get('password').value">两次输入的密码不一致！
              </span>
            </nz-form-explain>
          </nz-form-control>
        </nz-form-item>

        <nz-form-item>
          <nz-form-control>
            <button nz-button nzType="primary" nzBlock nzSize="large" (click)="getPassword()">修改密码</button>
          </nz-form-control>
        </nz-form-item>

      </form>
    </nz-content>
  </div>
</nz-layout>
